<head>
    <title></title>
    <meta charset="utf8">
</head>
<body>
<h2  align="center">志愿信息</h2>
<form method="POST" action="dostusoci.php">
    <table width="520" border="1" align="center">
        <tr bgcolor="#0066cc">
            <td width="80" align="center"><font color="#FFFFFF"><b>学号</b></font></td>
            <td width="80" align="center"><font color="#FFFFFF"><b>姓名</b></font></td>
            <td width="80" align="center"><font color="#FFFFFF"><b>班级</b></font></td>
            <td width="80" align="center"><font color="#FFFFFF"><b>院系</b></font></td>
            <td width="80" align="center"><font color="#FFFFFF"><b>志愿状态</b></font></td>
            <td width="120" align="center"><font color="#FFFFFF"><b>操作</b></font></td>
        </tr>
<?php
include("../functions/db_conn.php");
session_start();
$SociNo = $_SESSION['SociNo'];
$sql = " select * from student s, class c, stusoci ss, department d";
$sql .= "  where s.StuNo=ss.StuNo and s.ClassNo = c.ClassNo and d.DepartNO=c.DepartNo and ss.SociNo='".$SociNo."'";

$Result = mysql_query($sql);
$n = mysql_num_rows($Result);
for($i=0;$i<$n;$i++){
    $row=mysql_fetch_array($Result);
    echo '<tr>';
    echo "<td width='80' align='center'>".$row['StuNo']."</a></td>";
    echo "<td width='80' align='center'>".$row['StuName']."</td>";
    echo "<td width='80' align='center'>".$row['ClassName']."</td>";
    echo "<td width='80' align='center'>".$row['DepartName']."</td>";
    echo "<td width='80' align='center'><select name='State'>";
    echo "<option value='".$row['State']."' selected>".$row['State']."</option>";
    echo "<option value='通过'>通过</option>";
    echo "<option value='退回'>退回</option>";
    echo "</td>";
    echo "<td width='120' align='center'><input type='submit' value='确认' name='ok'>&nbsp<input type='reset' value='取消' name='reset'></td>";
    echo '<input type="hidden" name="StuNo" value="'.$row['StuNo'].'" >';
    echo '<input type="hidden" name="SociNo" value="'.$row['SociNo'].'" >';
    echo '</tr>';
}  
?>
    </table>
</form>
</body>
</html>
